package src;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.Properties;

/**
 * Created by dell on 2017/7/27.
 */
public class PropertyTest {
    public static void main(String[] args) throws Exception{
        Properties p=new Properties();
        p.setProperty("username","321");
        p.setProperty("password","123456");
        p.store(new FileOutputStream("1.ini"),"comment line");
        Properties p2=new Properties();
        p2.setProperty("gender","male");
        p2.load(new FileInputStream("1.ini"));
        System.out.println(p2);
    }
}
